const {Joi} = require('express-validation')

const cateId = Joi.number().required().integer().min(1)
const name = Joi.string().required()
const alias = Joi.string().alphanum().required()

exports.addCate = {
    body: Joi.object({
        name,
        alias
    })
}

exports.cateId = {
    params: Joi.object({
        cateId
    })
}

exports.updateCateById = {
    body: Joi.object({
        cateId,
        name,
        alias
    })
}